﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jamaat_Financial_System.Model.BO;
using System.Collections.ObjectModel;
using System.Data.OleDb;

namespace Jamaat_Financial_System.Model.DAO
{
    public abstract class Base_DAO
    {
        protected OleDbConnection connection;
        protected OleDbCommand command;
        protected OleDbTransaction transaction;

        protected Base_DAO()
        {
            if (connection == null)
            {
                String connectionString = Properties.Settings.Default.connectionString;
                
                connection = new OleDbConnection(Properties.Settings.Default.connectionString);
                connection.Open();
            }

        }

        ~Base_DAO()
        {
        }

        public abstract ObservableCollection<Model.BO.Base_BO> UpdateList();
        public abstract int Insert(Model.BO.Base_BO record);
        public abstract int Delete(Model.BO.Base_BO record);
    }
}
